package com.stwyj.sbd.config;

import org.springframework.context.annotation.Configuration;
import org.springframework.http.HttpStatus;
import org.springframework.web.servlet.config.annotation.ViewControllerRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 *<p>
 * mvc配置
 *</p>
 *
 * @author stwyj
 * @since 2018/11/30
 */
@Configuration
public class MvcConfig implements WebMvcConfigurer {

    /**
     * 视图控制器，可用于负载等进行心跳检测，测试返回等
     * @param registry 注册器
     */
    @Override
    public void addViewControllers(ViewControllerRegistry registry) {
        // 根目录心跳检测
        registry.addStatusController("", HttpStatus.OK);
    }


}
